package net.xiaoyu233.mitemod.miteite.entity;

import net.minecraft.*;
import net.xiaoyu233.mitemod.miteite.item.Items;

public class EntityRitualZombie extends EntityZombie {
    public EntityRitualZombie(World world) {
        super(world);
        this.setEntityAttribute(GenericAttributes.maxHealth, 100f);
        this.setEntityAttribute(GenericAttributes.movementSpeed,0f);
        this.setHealth(100f);// 禁止拾取物品
        this.setCanPickUpLoot(false);
        this.getNavigator().clearPathEntity();
        this.setCurrentItemOrArmor(1, new ItemStack(Items.VIBRANIUM_HELMET, 1).randomizeForMob(this, true));
        this.setCurrentItemOrArmor(2, new ItemStack(Items.VIBRANIUM_CHESTPLATE, 1).randomizeForMob(this, true));
    }
    @Override
    public void onUpdate() {
        super.onUpdate();
        if (worldObj.isRemote) {
            // 持续紫雾效果
            worldObj.spawnParticle(EnumParticle.flame,
                    posX + (rand.nextDouble() - 0.5) * 1,
                    posY + 1,
                    posZ + (rand.nextDouble() - 0.5) * 1,
                    0, 0.1, 0);
        }
    }

    @Override
    public void onDeath(DamageSource par1DamageSource) {
    }

    @Override
    protected void dropFewItems(boolean recently_hit_by_player, DamageSource damage_source) {

    }
}
